/**
 *                            License
 * THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS  
 * CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). 
 * THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW.  
 * ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR  
 * COPYRIGHT LAW IS PROHIBITED.
 * 
 * BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND  
 * AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE  
 * MAY BE CONSIDERED TO BE A CONTRACT,
 * THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED 
 * HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
 * 
 */
package com.lineage.server.model.item.action;

import com.lineage.server.model.Instance.L1ItemInstance;
import com.lineage.server.model.Instance.L1PcInstance;
import com.lineage.server.model.item.L1Item;

/**
 * Class <code>L1ItemAction</code> 超级接口:道具动作.
 * 
 * @author jrwz
 * @version 2012-6-20下午03:31:50
 * @see com.lineage.server.model.item.action
 * @since JDK1.7
 */
public interface L1ItemAction {

    /**
     * 接受请求.
     * 
     * @param pc
     *            - 对象
     * @param item
     *            - 道具
     * @return true or false
     */
    boolean acceptsRequest(final L1PcInstance pc, L1ItemInstance item);

    /**
     * 道具动作执行~XML.
     * 
     * @param pc
     *            - 对象
     * @param useItem
     *            - 使用的物件
     * @param readC1
     *            - readC1
     * @param readC2
     *            - readC2
     * @param targetId
     *            - 选取目标的OBJID
     * @param targetX
     *            - X坐标
     * @param targetY
     *            - Y坐标
     * @return 执行结果
     */
    L1Item execute(final L1PcInstance pc, final L1ItemInstance useItem,
            final int readC1, final int readC2, final int targetId,
            final int targetX, final int targetY);

    /**
     * 执行使用量.
     * 
     * @param actionName
     *            - 动作名称
     * @param pc
     *            - 对象
     * @param item
     *            - 道具
     * @param amount
     *            - 数量
     * @return 使用数量
     */
    L1Item executeWithAmount(String actionName, L1PcInstance pc,
            L1ItemInstance item, int amount);
}
